package com.itheima.homework;

import java.util.Scanner;
public class Test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个整数:");
        int a = sc.nextInt();
        System.out.println("请输入第二个整数:");
        int b = sc.nextInt();
        System.out.println("请输入第三个整数:");
        int c = sc.nextInt();
        System.out.print("从大到小的顺序是: ");
        list(a, b, c);
    }

    public static void list(int a, int b, int c) {
        int x = a > b ? a : b;
        int max = x > c ? x : c;
        int y = a < b ? a : b;
        int min = y < c ? y : c;
        int mid = a + b + c - max - min;
        System.out.println(max + " " + mid + " " + min);
    }
}
